﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using UcAsp.Models;
namespace UcAsp.Controllers
{
    public class SetFiledController : Controller
    {
        //
        // GET: /SetFiled/
        private UcAspNetEntities entities = new UcAspNetEntities();
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult ShowSetFiled()
        {
            List<Categories> list = entities.Categoriess.ToList();
            IEnumerable<Categories> accessIDs = list;

            SelectList selectlist = new SelectList(accessIDs, "ID", "CategorieName");
            ViewData["selectlist"] = selectlist;
            List<string> sort =new List<string>{"", "Categorie"};
            ViewData["sort"] = new SelectList(sort);
            
            
            List<string> selectfiled = new List<string> {"CategorieID","Title","Tag","ArticleContent","IconUrl","Note1","Note2","Note3","Int1","MetaKeyword","MetaDescrition","Description","Note4","Note5","Note6","Note7","Float1","Int2","Note8","Note9"};
            

            ViewData["selectfiled"] = new SelectList(selectfiled);


            List<string> inputfiled = new List<string> { "text", "select", "textarea"};
            ViewData["inputfiled"] = new SelectList(inputfiled);


            UcAsp.Models.SetFiled filed = new SetFiled();
            
            return View(filed);
        }
        public ActionResult UpdateSetFiled(SetFiled model)
        {
            SetFiled models = model;
            return View();
        }
    }
}
